<template>
  <view class="page" :style="themeColor">
    <view class="flex benben-position-layout flex flex-wrap align-center privacyPolicy_flex_0"
      :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
      <view class='flex flex-wrap align-center justify-between flex-sub privacyPolicy_fd0_0'>
        <view class='flex flex-wrap align-center'>
          <text class='fu-iconfont2  privacyPolicy_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">&#xE794;</text>
        </view>
        <view class='flex flex-wrap align-stretch justify-center flex-sub'>
          <text class='privacyPolicy_fd0_0_c1_c0' v-if="type=='1'">注册协议</text><text class='privacyPolicy_fd0_0_c1_c0'
            v-if="type=='2'">隐私政策</text>
        </view>
        <view class='flex flex-wrap align-center privacyPolicy_fd0_0_c2'>
        </view>
      </view>

    </view>
    <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
    <view class="ben_fu-jyf-parser_1">
      <jyf-parser :html="parser1 | richTextFormat"></jyf-parser>
    </view>


  </view>
</template>
<script>
  export default {
    components: {},


    data() {
      return {
        "parser1": "这是富文本",
        "type": "1"
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        type
      } = options
      if (type !== undefined) this.type = type
      this.getxieyi()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      async getxieyi() {
        if (this.type == 1) {
          this.aid = 1
        } else {
          this.aid = 2
        }
        let res = await this.$api.post(global.apiUrls.xieyi, {
          aid: this.aid
        });
        console.log(res, 'ressssssss')
        if (res.data.code != 1) {
          this.$message.info(res.data.msg)
          return
        }
        this.parser1 = res.data.data.content
        console.log(this.parser1, 'this.parser1')
      },
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #fff;
    background-size: 100% auto !important;
  }

  .privacyPolicy_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .privacyPolicy_fd0_0_c2 {
    width: 32rpx;
    height: 32rpx;
  }

  .privacyPolicy_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #333;
    line-height: 88rpx;
  }

  .privacyPolicy_fd0_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 500;
    color: #333;
    line-height: 88rpx;
  }

  .privacyPolicy_fd0_0 {
    margin: 0rpx 32rpx 0rpx 32rpx;
  }

  .ben_fu-jyf-parser_1 {
    background-color: #fff;
    padding-left: 32rpx;
    padding-right: 32rpx;
    padding-top: 32rpx;
    padding-bottom: 32rpx;

  }
</style>
